package com.crm.model;

import org.apache.commons.lang.builder.ToStringBuilder;

import java.io.Serializable;

/**
 * @author <a href="mailto:huang0510@hotmail.com">HuangHuang</a>
 * @version $Id$
 * @hibernate.class table="USER"
 */
public class User implements Serializable {

    private String id;
    private String username;
    private String truename;
    private String password;
    private String jobTitle;
    private String userType;
    private String userCode;
    private String userGroup;
    private String sex;

    public static final String GROUP_SUPER = "超级管理员";
    public static final String GROUP_ADMIN = "管理员";
    public static final String GROUP_USERS = "普通用户";

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getUserGroup() {
        return userGroup;
    }

    public void setUserGroup(String userGroup) {
        this.userGroup = userGroup;
    }

    public User() {
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setTruename(String truename) {
        this.truename = truename;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setJobTitle(String jobTitle) {
        this.jobTitle = jobTitle;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getId() {
        return id;
    }

    public String getUserCode() {
        return userCode;
    }

    public String getUsername() {
        return username;
    }

    public String getTruename() {
        return truename;
    }

    public String getPassword() {
        return password;
    }

    public String getJobTitle() {
        return jobTitle;
    }

    public String getUserType() {
        return userType;
    }

    public String toString() {
        return new ToStringBuilder(this)
                .append("id", getId())
                .append("userCode", getUserCode())
                .append("username", getUsername())
                .append("truename", getTruename())
                .append("password", getPassword())
                .append("jobTitle", getJobTitle())
                .append("userType", getUserType())
                .append("userGroup", getUserGroup())
                .toString();
    }

}
